/* Ejercicio 4.19
   ejer4_19.c */
#include <stdio.h>

/* funcion main, el programa inicia aca */
int main( void )
{
    int product, quantity;
    float total;

    printf( "Enter the product number: " );
    scanf( "%d", &product );
    printf( "Enter the quantity sold for one day: " );
    scanf( "%d", &quantity );

    switch( product ) {
        case 1:
            total = quantity * 2.98;
            break;
        case 2:
            total = quantity * 4.50;
            break;
        case 3:
            total = quantity * 9.98;
            break;
        case 4:
            total = quantity * 4.49;
            break;
        case 5:
            total = quantity * 6.87;
            break;
        default:
            total = 0;
            printf( "The product doesn't exists\n" );
            break;
    }

    printf ( "The total is: $%.2f\n", total );
	return 0;
} /* fin de la funcion main */
